/**
 * Created by caoziwen on 2018/05/26.
 */
import * as types from './mutation-types'

const mutations = {
  [types.SET_UINFO](state, U) {
    state.uinfo = U
  },
  [types.SET_UPORDOWN](state, ud) {
    state.up_or_down = ud
  },
  [types.SET_TEMP_DATA](state, NDATA) {
    state.temp_data = NDATA
  },
  [types.SET_EDITABLE](state, editable) {
    state.editable = editable
  },
  [types.SET_IS_PREVIEW](state, is_preview) {
    state.is_preview = is_preview
  },
  [types.SET_BANNER_HEIGHT](state, BH) {
    state.banner_height = BH
  },
  [types.SET_MODULE_ICON](state, MICON) {
    state.temp_data.module_icon = MICON
  },
  // setML: (state,val)=>{state.moneyLists = val},
  setML: (state,info)=>{
    // 创建一个新的对象，将info,state.personInfo对象复制到新对象中
    let data = Object.assign({},info); 
    // 将state.personInfo指向新对象的引用地址
    state.moneyLists = data;
  },
  getInstrucTitle:(state,val)=>{state.instrucTitle = val},
  getInstrucIntro:(state,val)=>{state.instrucIntro = val}
}
export default mutations
